<?php

/**
 * RegistrationForm class.
 * RegistrationForm is the data structure for keeping
 * user registration form data. It is used by the 'register' action of 
 * 'SiteController'.
 */
class RegistrationForm extends CFormModel
{
    public $username;
	public $password;
	public $repeatpassword;
	public $firstname;
	public $prefix;
	public $lastname;
	public $emailaddress;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			array('username, password, repeatpassword, firstname, 
                            lastname, emailaddress', 'required'),
            array('emailaddress', 'email'),
            array('repeatpassword', 'compare', 
                'compareAttribute'=>'password'),
		);
	}
        
        /**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'username' => 'Gebruikersnaam',
			'password' => 'Wachtwoord',
			'repeatpassword' => 'Herhaal wachtwoord',
			'firstname' => 'Voornaam',
			'prefix' => 'Tussenvoegsel',
			'lastname' => 'Achternaam',
			'emailaddress' => 'Emailadres',
		);
	}
}